package com.zp.self.module.level_4_算法练习.算法.广度优先搜索;

import com.google.common.collect.Lists;

import java.util.List;

public class Node {
    public int val;
    public List<Node> children;

    public Node() {
    }

    public Node(int _val) {
        val = _val;
    }

    public Node(int _val, List<Node> _children) {
        val = _val;
        children = _children;
    }

    public static Node initNode() {
        Node root_0 = new Node(1);

        Node root_1_0 = new Node(2);
        Node root_1_1 = new Node(3);
        Node root_1_2= new Node(4);
        Node root_1_3 = new Node(5);
        root_0.children= Lists.newArrayList(root_1_0,root_1_1,root_1_2,root_1_3);

        Node root_2_0 = new Node(6);
        Node root_2_1 = new Node(7);
        root_1_1.children= Lists.newArrayList(root_2_0,root_2_1);

        Node root_2_2 = new Node(8);
        root_1_2.children= Lists.newArrayList(root_2_2);

        Node root_2_3 = new Node(9);
        Node root_2_4 = new Node(10);
        root_1_3.children= Lists.newArrayList(root_2_3,root_2_4);

        Node root_3_0 = new Node(11);
        root_2_1.children= Lists.newArrayList(root_3_0);

        Node root_3_1 = new Node(12);
        root_2_2.children= Lists.newArrayList(root_3_1);

        Node root_3_2 = new Node(13);
        root_2_3.children= Lists.newArrayList(root_3_2);

        Node root_4_0 = new Node(14);
        root_3_0.children= Lists.newArrayList(root_4_0);

        return root_0;
    }
}